package com.pswv2.backstage.more.requirements.user.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pswv2.backstage.more.requirements.user.service.UserRequirementsService;
import com.pswv2.bub.bsc.dao.po.UserRequirements;
import com.pswv2.util.ExtraSpringHibernateTemplate;


@Service
public class UserRequirementsImpl implements UserRequirementsService {
	private static Class<?> poc = UserRequirements.class;
	@Autowired
	private ExtraSpringHibernateTemplate extraSpringHibernateTemplate;


	@Override
	public UserRequirements queryById(Integer userRequirementsId) {
		return extraSpringHibernateTemplate.findFirstOneByPropEq(poc, "userRequirementsId", userRequirementsId);
	}
	
	@Override
	public List<UserRequirements> queryByUserIdRequirements(Integer userId) {
		return extraSpringHibernateTemplate.findAllByPropEq(poc, "userId", userId);
	}
}
